<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%set string category_title=get_category_title(model.category_id,"新闻资讯")%>
<title>{model.title} - {category_title} - {site.name}</title>
<meta content="{model.seo_keywords}" name="keywords" />
<meta content="{model.seo_description}" name="description" />
<link href="<%templateskin%>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="{config.webpath}scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/common.js"></script>
</head>

<body>
<!--Header-->
<%template src="_header.html"%>
<!--/Header-->

<div class="section clearfix">
  <!--右边-->
  <div class="list-right">
    <div class="sidebar-box">
      <div class="line30"></div>
      <h3>资讯类别</h3>
      <ul class="navbar">
        <%set DataTable categoryList1=get_category_child_list(channel, 0)%>
        <%foreach(DataRow cdr1 in categoryList1.Rows)%>
        <li>
          <h4><a href="<%linkurl("news_list",{cdr1[id]})%>">{cdr1[title]}</a></h4>
          <p>
            <%set DataTable categoryList2=get_category_child_list(channel, {strtoint({cdr1[id]})})%>
            <%foreach(DataRow cdr2 in categoryList2.Rows)%>
            <%if({strtoint({cdr2[id]})}=={model.category_id})%>
            <a href="<%linkurl("news_list",{cdr2[id]})%>" class="selected">{cdr2[title]}</a>
            <%else%>
            <a href="<%linkurl("news_list",{cdr2[id]})%>">{cdr2[title]}</a>
            <%/if%>
            <%/foreach%>
          </p>
        </li>
        <%/foreach%>
      </ul>
      <div class="line20"></div>
      <h3>推荐资讯</h3>
      <div class="focus-list">
        <ul>
          <%set DataTable redNews=get_article_list(channel, 0, 4, "status=0 and is_red=1 and img_url<>''")%>
          <%foreach(DataRow dr in redNews.Rows)%>
          <li>
            <a title="{dr[title]}" href="<%linkurl("news_show",{dr[id]})%>">
              <b><img src="{dr[img_url]}" /></b>
              <span>{dr[title]}</span>
            </a>
          </li>
          <%/foreach%>
        </ul>
      </div>
      <div class="line10"></div>
      <h3>人气排行</h3>
      <ul class="rank-list">
        <%set DataTable hotNews=get_article_list(channel, 0, 10, "status=0", "click desc,id desc")%>
        <%loop hotdr hotNews%>
        <%if(hotdr__loop__id==1)%>
        <li class="active">
        <%else%>
        <li>
        <%/if%>
          <span><%datetostr({hotdr[add_time]},MM-dd)%></span>
          <i class="num"><%=hotdr__loop__id%></i><a href="<%linkurl("news_show",{hotdr[id]})%>">{hotdr[title]}</a>
        </li>
        <%/loop%>
      </ul>
    </div>
  </div>
  <!--/右边-->
  
  <!--左边-->
  <div class="list-auto">
    
    <div class="meta">
      <h1>{model.title}</h1>
      <p class="meta-info">
        <span class="time">{model.add_time}</span>
        <span class="comm"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_comment_count&id={model.id}"></script>人评论</span>
        <span class="view"><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_article_click&id={model.id}&click=1"></script>次浏览</span>
        分类：{category_title}
      </p>
    </div>
    
    <div class="entry">
      {model.content}
    </div>
    
    <!--分享-->
    <%template src=/_share_js.html/%>
    <!--/分享-->
    <div class="line15"></div>
    
    <!--上下篇-->
    <div class="next-prev-single">
      <p class="prev">上一篇：<%=get_prevandnext_article("news_show", -1, "没有了", 0)%></p>
	  <p class="next">下一篇：<%=get_prevandnext_article("news_show", 1, "没有了", 0)%></p>
    </div>
    <!--/上下篇-->
    
    <div class="line15"></div>
    <!--相关推荐-->
    <h2 class="base-tit">
      <span>相关资讯</span>
    </h2>
    <div class="rel-list">
      <ul>
        <%set DataTable relNews=get_article_list(channel, model.category_id, 4, "is_red=1 and img_url<>'' and id<>"+model.id)%>
        <%foreach(DataRow dr in relNews.Rows)%>
        <li>
          <div class="img-box">
            <a title="{dr[title]}" href="<%linkurl("news_show",{dr[id]})%>">
              <img src="{dr[img_url]}" />
            </a>
          </div>
          <div class="info">
            <h3><a title="{dr[title]}" href="<%linkurl("news_show",{dr[id]})%>">{dr[title]}</a></h3>
            <p>{dr[zhaiyao]}</p>
            <span>{dr[add_time]}</span>
          </div>
        </li>
        <%/foreach%>
        <%if(relNews.Rows.Count<1)%>
        <div class="nodata">暂无相关的资讯...</div>
        <%/if%>
      </ul>
    </div>
    <!--/相关推荐-->
    <div class="clear"></div>
    
    <!--用户评论-->
    <%if(model.is_msg==1)%>
    <h2 class="base-tit">
      <i>共有<b><script type="text/javascript" src="{config.webpath}tools/submit_ajax.ashx?action=view_comment_count&id={model.id}"></script></b>访客发表了评论</i>
      <span>网友评论</span>
    </h2>
    <%template src="_comment_box.html"%>
    <%/if%>
    <!--用户评论-->
    
  </div>
  <!--/左边-->
  
</div>

<!--Footer-->
<%template src="_footer.html"%>
<!--/Footer-->
</body>
</html>